//
// Created by Semir on 2020/5/15.
//
#include <iostream>
#include <stack>

using namespace std;

stack<int> mainStack;
stack<int> minStack;

void push(int value) {
    mainStack.push(value);
    if (minStack.empty() || minStack.top() > value) {
        minStack.push(value);
    } else {
        minStack.push(minStack.top());
    }
}

void pop() {
    mainStack.pop();
    minStack.pop();
}

int top() {
    return mainStack.top();
}

int min() {
    return minStack.top();
}

int main() {

    return 0;
}


